﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Services.Description;

namespace Assign6
{
    class WebMethod
    {
        string _name;
        public string input;
        public string output;
        Parameter[] _inputParameters;
        Parameter[] _outputParameters;

        public WebMethod(string name, Parameter[] inputParameters, Parameter[] outputParameters)
        {
            _name = name;
            _inputParameters = inputParameters;
            _outputParameters = outputParameters;
        }
        public WebMethod(string name, Parameter[] inputParameters, Parameter[] outputParameters,string _input,string _output)
        {
            _name = name;
            _inputParameters = inputParameters;
            _outputParameters = outputParameters;
            input = _input;
            output = _output;
        }

        /// <summary>
        /// Name
        /// </summary>
        public string Name
        {
            get { return _name; }
        }

        /// <summary>
        /// InputParameters
        /// </summary>
        public Parameter[] InputParameters
        {
            get { return _inputParameters; }
        }

        /// <summary>
        /// OutputParameters
        /// </summary>
        public Parameter[] OutputParameters
        {
            get { return _outputParameters; }
        }

        public struct Parameter
        {
            /// <summary>
            /// constructor
            /// </summary>
            /// <param name="name">
            /// <param name="type">
            public Parameter(string name, string type)
            {
                this.Name = name;
                this.Type = type;
                elements=  new List<Parameter>();
            }
          

            /// <summary>
            /// Name
            /// </summary>
            public string Name;
            /// <summary>
            /// Type
            /// </summary>
            public string Type;

            public List<Parameter> elements;
        }

        
    }
}
